package service.impl;

import java.sql.SQLException;
import java.util.List;

import domain.vo.queryObject;
import module.CusProgress;
import service.cusProgressService;
/**
 * 
* @ClassName: CusProgressServiceImpl
* @Description:客户随访记录服务实现类
* @author chenchao
* @date 2013-10-31 上午02:00:38
*
 */
public class CusProgressServiceImpl extends cusProgressService{

	/* (non-Javadoc)
	 * @see service.basicService#countByQueryObject(domain.vo.queryObject)
	 */
	public int countByQueryObject(queryObject queryObject) throws SQLException {
		return cusProgressDAO.countByQueryObject(queryObject);
	}

	/* (non-Javadoc)
	 * @see service.basicService#getObjectByQueryObject(domain.vo.queryObject)
	 */
	public List<CusProgress> getObjectByQueryObject(queryObject queryObject) throws SQLException {
		return cusProgressDAO.getObjectByQueryObject(queryObject);
	}

	/* (non-Javadoc)
	 * @see service.basicService#deleteT(java.lang.Object)
	 */
	public void deleteT(CusProgress t) throws SQLException {
		// TODO Auto-generated method stub
		
	}

	/* (non-Javadoc)
	 * @see service.basicService#getAll()
	 */
	public List<CusProgress> getAll() throws SQLException {
		// TODO Auto-generated method stub
		return cusProgressDAO.getAll();
	}

	/* (non-Javadoc)
	 * @see service.basicService#getById(java.lang.String)
	 */
	public CusProgress getById(String id) throws SQLException {
		// TODO Auto-generated method stub
		return cusProgressDAO.getById(id);
	}

	/* (non-Javadoc)
	 * @see service.basicService#insertObject(java.lang.Object)
	 */
	public void insertObject(CusProgress t) throws SQLException {
		
	
		try {
			sqlMapClient.startTransaction();
			cusProgressDAO.insertT(t);
			if (t.getNewHouse() != null) {
				newHouseDAO.updateT(t.getNewHouse());
			}
			if (t.getReqHouse() != null) {
				requirementHouseDAO.updateT(t.getReqHouse());
			}
			sqlMapClient.commitTransaction();
		} finally {
			sqlMapClient.endTransaction();
		}
		
	}

	/* (non-Javadoc)
	 * @see service.basicService#updateObject(java.lang.Object)
	 */
	public void updateObject(CusProgress t) throws SQLException {
		// TODO Auto-generated method stub
		
	}

}
